import 'package:flutter/material.dart';

import '../model/video_item_model.dart';

class TagListView extends StatelessWidget {
  final List<VideoTags> tags;

  const TagListView({super.key, required this.tags});

  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 4.0,
      runSpacing: 4.0,
      children: List.generate(tags.length > 3 ? 3 : tags.length, (index) {
        return Chip(
          label: Text(tags[index].name),
          labelStyle: TextStyle(
            fontSize: 12,
            color: Color(0xFF286ECD),
          ),
          labelPadding: EdgeInsets.symmetric(horizontal: 0, vertical: -4),
          padding: EdgeInsets.symmetric(horizontal: 8, vertical: 0),
          side: BorderSide(width: 0, color: Colors.transparent),
          backgroundColor: Color(0xFFE7F0FA),
        );
      }),
    );
  }
}
